import utils from '../utils/utils';
import request from '../utils/request';


//新增部门
export function addDepartment(data) {
    return request({
        url: '/configuration_system/v1_0_0/department/addDepartment',
        method: 'post',
        data
    })
}
//新增岗位
export function addPosition(data) {
    return request({
        url: '/configuration_system/v1_0_0/position/addPosition',
        method: 'post',
        data
    })
}

//删除部门 
export function delDepartment(data) {
    return request({
        url: '/configuration_system/v1_0_0/department/delDepartment',
        method: 'post',
        data
    })
}
// 删除岗位
export function delPosition(data) {
    return request({
        url: '/configuration_system/v1_0_0/position/delPosition',
        method: 'post',
        data
    })
}
// 修改部门
export function updDepartment(data) {
    return request({
        url: '/configuration_system/v1_0_0/department/updDepartment',
        method: 'post',
        data
    })
}
// 修改岗位权限
export function updPosition(data) {
    return request({
        url: '/configuration_system/v1_0_0/position/updPosition',
        method: 'post',
        data
    })
}
// 获取所有部门
export function getDepartmentList(data) {
    return request({
        url: '/configuration_system/v1_0_0/department/getDepartmentList',
        method: 'post',
        data
    })
}
// 根据部门ID获取岗位
export function getPositionByDepartId(data) {
    return request({
        url: '/configuration_system/v1_0_0/position/getPositionByDepartId',
        method: 'post',
        data
    })
}
// 根据岗位ID获取对应的权限
export function getPositionById(data) {
    return request({
        url: '/configuration_system/v1_0_0/position/getPositionById',
        method: 'post',
        data
    })
}
// 部门下的岗位权限
export function getPositionAuthorityList(data) {
    return request({
        url: '/configuration_system/v1_0_0/department/getPositionAuthorityList',
        method: 'post',
        data
    })
}


